<?
/*
 *   Pmail easy way to send emails
 *   Copyright (C) 2009  Felipe Theodoro Gonçalves (www.ftgoncalves.com)
 *
 *   This program is free software: you can redistribute it and/or modify
 *	 it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
?>
<div id="page">
<p class="ind"><?= $html->link('View configs', array('plugin' => 'pmail', 'controller' => 'groups', 'action' => 'index')); ?> > Labels</p>
<h2><?= __d('pmail', 'Labels') ?></h2>
<p>
	<table>
		<caption class="left"><?= __d('pmail', 'View labels') ?></caption>
		<thead>
			<tr>
				<th scope="col"><?= __d('pmail', 'Name') ?></th>
				<th scope="col"><?= __d('pmail', 'Description') ?></th>
			</tr>
		</thead>
		<tbody>
			<?php
				$count = 0;
				foreach($labels as $aux){
					foreach($aux as $label){
						echo '<tr id="' . $count++ . '">';
							echo '<td>' . $label['name'] . '</td>';
							echo '<td>' . $label['description'] . '</td>';
						echo '</tr>';
					}
				}

			?>
		</tbody>
		<tfoot>
			<tr>
				<td colspan="2"><?= __d('pmail', 'For use the labels of email, you need the use prefixe [ and sufise ]') ?></td>
			</tr>
		</tfoot>
	</table>
</p>
</div>
<div id="sidebar">
<h4><?= __d('pmail', 'Coments') ?></h4>
<p><?= __d('pmail', 'View the labels available for use in e-mail') ?></p>
	<?= $this->requestAction('/pmail/configs/menu') ?>
	<?= $this->renderElement('recommended/links') ?>
</div>
<div class="clear"></div>
<script type="text/javascript">
	$().ready(function(){
		$('table tbody tr:odd').addClass('impar');
	});
</script>